load("@batfish//skylark:junit.bzl", "junit_tests")
load("@rules_java//java:java_library.bzl", "java_library")

package(default_visibility = ["//visibility:public"])

java_library(
    name = "minesweeper_testlib",
    srcs = ["org/batfish/minesweeper/ConfigAtomicPredicatesTestUtils.java"],
    deps = [
        "//projects/batfish-common-protocol:common",
        "//projects/minesweeper",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_guava_guava",
    ],
)

junit_tests(
    name = "minesweeper_tests",
    size = "small",
    srcs = glob([
        "**/*Test.java",
    ]),
    runtime_deps = [
        "@maven//:org_apache_logging_log4j_log4j_core",
        "@maven//:org_apache_logging_log4j_log4j_slf4j_impl",
    ],
    deps = [
        ":minesweeper_testlib",
        "//projects/batfish",
        "//projects/batfish:batfish_testlib",
        "//projects/batfish-common-protocol:common",
        "//projects/batfish-common-protocol/src/test:common_testlib",
        "//projects/batfish-common-protocol/src/test/java/org/batfish/common/bdd:matchers",
        "//projects/batfish-common-protocol/src/test/java/org/batfish/common/plugin:IBatfishTestAdapter",
        "//projects/batfish-common-protocol/src/test/java/org/batfish/datamodel:testlib",
        "//projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers",
        "//projects/bdd",
        "//projects/minesweeper",
        "//projects/question/src/main/java/org/batfish/question",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_guava_guava_testlib",
        "@maven//:dk_brics_automaton",
        "@maven//:junit_junit",
        "@maven//:org_apache_commons_commons_lang3",
        "@maven//:org_apache_commons_commons_text",
        "@maven//:org_hamcrest_hamcrest",
    ],
)
